/**
 * 
 */
package com.hawkfly.interceptor;

import com.wbcs.config.component.application.report.ReportBean;
import com.wbcs.system.ReportRequest;
import com.wbcs.system.intercept.AbsInterceptorDefaultAdapter;

/**
 *
 * @author hawkfly
 * @date 2014-11-26下午8:26:02
 */
public class LoadJSInit extends AbsInterceptorDefaultAdapter {

	@Override
	public Object afterLoadData(ReportRequest rrequest,ReportBean rbean,Object typeObj,Object dataObj)
    {
        StringBuffer paramsBuf=new StringBuffer();
        paramsBuf.append("{pageid:'"+rrequest.getPagebean().getId()+"'"); 
        paramsBuf.append(",reportid:'"+rbean.getId()+"'");
        paramsBuf.append("}");
        rrequest.getWResponse().addOnloadMethod("init",paramsBuf.toString(),false);
        
        //rrequest.getWResponse().setStatecode(Consts.STATECODE_NONREFRESHPAGE);
        return dataObj;
    }
}
